# -*- coding: utf-8 -*- 
# 作者:飞虎
# 开发时间:2022/5/23 17:04
from PyQt5.Qt import *


class Window(QWidget):
	def __init__(self):
		super().__init__()
		self.setWindowTitle('QSS案例学习')
		self.resize(800, 800)
		self.setup_ui()

	def setup_ui(self):
		self.setStyleSheet("""
			QPushButton{
					background-image:url(./puke.png);
					border:20px double red;
					background-origin:content;
					background-clip:padding;
					}
				""")
		h_layout = QHBoxLayout(self)

		for i in range(13):
			btn = QPushButton(self)
			btn.setFixedSize(80, 100)
			btn.setStyleSheet("""
					padding-left:-%dpx;
					padding-top:-%dpx;
				}
			""" %(i*40,0))
			h_layout.addWidget(btn)


if __name__ == '__main__':
	import sys

	app = QApplication(sys.argv)
	window = Window()
	window.show()
	sys.exit(app.exec_())
